#include<stdio.h>

int main(void)
{
	int n,cost;
	
	scanf("%d",&n);
	
	if(n>=30)
	{
		cost=n*48;
	}
	else
	{
		cost=n*50;
	}
	
	printf("%.2f",(float)cost);
	
	return 0;
}
